home *** CD-ROM | disk | FTP | other *** search
/ Softdisk for Windows 42 / Softdisk for Windows 42.iso / QUARRY / QUARRY.EXE / QUARRY.dxr / 00024_CHECKBLUEMOVE.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  3.1 KB  |  116 lines

  1. on CHECKBLUEMOVE
  2.   global GN, GRIDV, GRIDY, GRIDH, MV, MVV, GNN, DT, STARTED, EXITROW, MANBH, MANBY, SOND, REDSCORE, BLUESCORE, GAMELEN, Z, ZZZ, ZZ
  3.   set MVV to 1
  4.   if (getAt(GRIDH, GN) = getAt(GRIDH, 14)) and (getAt(GRIDV, GN + 1) <> 0) then
  5.     exit
  6.   end if
  7.   repeat while (getAt(GRIDY, GN) <> getAt(GRIDY, 140)) and (MVV = 1)
  8.     if getAt(GRIDV, GN + 14) = 0 then
  9.       set the locH of sprite 9 to getAt(GRIDH, GN)
  10.       set the locV of sprite 9 to getAt(GRIDY, GN)
  11.       updateStage()
  12.       set the locH of sprite 9 to -50
  13.       set the locV of sprite 9 to -50
  14.       updateStage()
  15.       setAt(GRIDV, GN, 0)
  16.       set GN to GN + 14
  17.       set the locH of sprite 10 to getAt(GRIDH, GN)
  18.       set the locV of sprite 10 to getAt(GRIDY, GN)
  19.       if STARTED <> 0 then
  20.         set the castNum of sprite 10 to 89
  21.         updateStage()
  22.       end if
  23.       if STARTED <> 0 then
  24.         if SOND = 0 then
  25.           puppetSound("FALL")
  26.         end if
  27.         updateStage()
  28.         set DT to 12
  29.         COUNTTIME()
  30.         set DT to 3
  31.       end if
  32.       setAt(GRIDV, GN, 2)
  33.       set the castNum of sprite 10 to 12
  34.       updateStage()
  35.       set MV to 1
  36.       REMOVESPRITE()
  37.     end if
  38.     if getAt(GRIDY, GN) = getAt(GRIDY, 14) then
  39.       set MVV to 0
  40.     end if
  41.     if (MVV = 1) and (getAt(GRIDV, GN + 14) <> 0) then
  42.       set MVV to 0
  43.     end if
  44.   end repeat
  45.   if STARTED = 0 then
  46.     set ZZ to 1
  47.   end if
  48.   if STARTED = 0 then
  49.     set ZZZ to 36
  50.   end if
  51.   if STARTED = 1 then
  52.     set ZZZ to 4
  53.   end if
  54.   if STARTED = 1 then
  55.     set ZZ to 9
  56.   end if
  57.   if getAt(GRIDH, GN) = getAt(GRIDH, 14) then
  58.     exit
  59.   end if
  60.   if getAt(GRIDV, GN + 1) = 0 then
  61.     if (STARTED <> 0) and (SOND = 0) then
  62.       puppetSound("STEP")
  63.     end if
  64.     set GNN to getAt(GRIDH, GN)
  65.     repeat with i = 1 to ZZ
  66.       if STARTED = 0 then
  67.         set the locH of sprite 9 to GNN
  68.         set the locV of sprite 9 to getAt(GRIDY, GN)
  69.         updateStage()
  70.       end if
  71.       set GNN to GNN + ZZZ
  72.       CHANGEBLUEROLL()
  73.       set the locH of sprite 10 to GNN
  74.       set the locV of sprite 10 to getAt(GRIDY, GN)
  75.       updateStage()
  76.       if STARTED = 1 then
  77.         set DT to 2
  78.         COUNTTIME()
  79.       end if
  80.     end repeat
  81.     set the castNum of sprite 10 to 12
  82.     set the locH of sprite 9 to -50
  83.     set the locV of sprite 9 to -50
  84.     setAt(GRIDV, GN, 0)
  85.     set GN to GN + 1
  86.     setAt(GRIDV, GN, 2)
  87.     set MV to 1
  88.     updateStage()
  89.     if getAt(GRIDH, GN) = getAt(GRIDH, 14) then
  90.       set EXITROW to GN / 14
  91.       setAt(GRIDV, GN, 0)
  92.       set MANBH to getAt(GRIDH, GN)
  93.       set MANBY to getAt(GRIDY, GN)
  94.       REMOVESPRITE()
  95.       MOTORRED()
  96.     end if
  97.   end if
  98.   if (GN < 136) and (STARTED <> 0) then
  99.     if (getAt(GRIDV, GN + 14) = 3) and (getAt(GRIDV, GN + 1) = 0) then
  100.       if SOND = 0 then
  101.         puppetSound("BOING")
  102.       end if
  103.       updateStage()
  104.       set the locH of sprite 29 to getAt(GRIDH, GN + 14)
  105.       set the locV of sprite 29 to getAt(GRIDY, GN + 14)
  106.       set the castNum of sprite 29 to 92
  107.       updateStage()
  108.       set DT to 12
  109.       COUNTTIME()
  110.       set the castNum of sprite 29 to 4
  111.       updateStage()
  112.     end if
  113.   end if
  114.   REMOVESPRITE()
  115. end
  116.